import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
	//所有非页面级权限
	Collection: {},
	//当前用户获得的按钮权限
  Group: [],
	//路由映射
	routeMap: {},
	//当前页面非页面级权限
	pageCollection:{},
	path: ""

}
const mutations = {
	set_collection(state,obj) {
		state.Collection = obj
	},
	set_group(state,arr) {
		state.Group = arr
	},
	set_route_map(state,obj) {
		state.routeMap = obj
	},
	set_page_collection(state,collection) {
		state.pageCollection = collection
	},
	set_path(state,path) {
		state.path = path;
	}
}
export default new Vuex.Store({
  state,
  mutations
})
